package com.etone.smartAudit.service;

import com.etone.smartAudit.mapper.FieldMapper;
import com.etone.smartAudit.vo.PagerVO;
import com.etone.smartAudit.vo.field.FieldVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author: sovy
 * @date: 2020/8/18
 * @description:
 */
@Service
@AllArgsConstructor
public class FieldService {

    private FieldMapper fieldMapper;

    /**
     * 查找审计案例库领域
     *
     * @param page
     * @param pageSize
     * @return
     */
    public PagerVO<FieldVO> findList(int page, int pageSize) {
        Page<FieldVO> fieldVOPage = PageHelper.startPage(page, pageSize).doSelectPage(() -> {
            fieldMapper.findList();
        });
        return PagerVO.of(fieldVOPage);
    }
}
